import { AxiosRequest } from '@/api/http';
import { apiFlow } from '@/api/index';
/**
 * 用户管理相关api
 */
class User {
  /**
   * @description 登录接口
   * @param {object} params
   * @param {string} params.username
   * @param {string} params.password
   */
  login(params) {
    return apiFlow(AxiosRequest.post(`/user/login`, params));
  }

  /**
   * @description 退出登录
   */
  logout() {
    return apiFlow(AxiosRequest.post(`/user/logout`));
  }

  /**
   * @description
   */
  update() {
    return apiFlow(AxiosRequest.post(`/user/update`));
  }
}

export { User };
